﻿using System;
using MySql.Data.MySqlClient;
using System.Text;
namespace AutofacLifetimeTest
{
    public class DisposeModel : IDisposable
    {
        public MySqlConnection connection;

        public DisposeModel()
        {
            connection = new MySqlConnection();
            connection.ConnectionString = "server=mysql01.rds.ucitymetro.com;port=3306;user id=dbtrans;password=Zhang123;database=itps_test;SslMode=none";
            connection.Open();
        }

        public void Dispose()
        {
            //Console.WriteLine("dispose right now");
            connection.Dispose();
        }
    }
}
